<extend name="Layout/application"/>

<block name="content">
    <div class="row">
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-8">
                    <div class="page-header">
                        <h3>文章信息</h3>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-default">
                        <div class="panel-heading">文章列表</div>
                        <div class="panel-body">
                            <table class="table">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>文章标题</th>
                                    <th>文章栏目</th>
                                    <th>创建时间</th>
                                    <th>&nbsp;编 辑</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="l">
                                    <tr>
                                        <td>{{$i}}</td>
                                        <td><font color="{{$l.title_color}}">{{$l.title}}</font></td>
                                        <td>{{$l.category.name}}</td>
                                        <td>{{$l.time|date='Y-m-d',###}}</td>
                                        <td><a href="{{:U('edit',array('id'=>$l['id']))}}"><span class="glyphicon glyphicon-pencil"></span></a>&nbsp;&nbsp;&nbsp;
                                            <a href="{{:U('del',array('id'=>$l['id']))}}" onclick="return confirm('确认删除吗？')"><span class="glyphicon glyphicon-trash"></span></a></td>
                                    </tr>
                                </volist>
                                <tr><td colspan="4" style="text-align: center"><div class="pagination" >{{$page}}</div></td></tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
                <div class="col-md-2">
                    <div class="list-group">
                        <a href="{{:U('create')}}" class="list-group-item list-group-item-info sort_category">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 新增 (add)
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>
